var addresslist_obj={
		//滑动刷新
		addresslist_find:function(){
			
			var loadpage=1;
			addresslist_obj.loadhtml(loadpage);
			$(window).scroll(function(){
				 if ($(document).scrollTop() >= $(document).height() - $(window).height()) {
//	                    alert("滚动条已经到达底部为" + $(document).scrollTop());
					 	loadpage++;
					 	addresslist_obj.loadhtml(loadpage);
	                }
			});
		},
		
		//加载地址信息
		loadhtml:function(loadpage){
			$.post('?s=Vip/addresslist/p/'+loadpage,function(data){
				if(data.ret==1){
					var html="";
					for(var i=0;i<data.msg.length;i++){
							html+='<div class="cont pr">'
			        		html+='<span><i class="fl">收件人：'+data.msg[i]["linkman"]+'</i><i class="fr">'+data.msg[i]["linktel"]+'</i></span>'
			        		html+='<p>收件地址：'+data.msg[i]['area']+data.msg[i]['address']+'</p>'
			        		html+='<div class="btns">'
			            	html+='<a href="?s=/Vip/addressedit/id/'+data.msg[i]["id"]+'">编辑</a>'
			            	html+='<a href="?s=/Vip/addressdelete/id/'+data.msg[i]["id"]+'" id="addressdelete"><img src="./Public/Wechat/api/images/deleteico.png"></a>'
			            	html+='</div>'
			            	html+='</div>'
					}
					$(".otheraddr").append(html);
					$("#addressdelete").live('click',function(){
						if(confirm('删除后，数据不可恢复，是否继续？')){
							return true;
						}else{
							return false;
						}
					});
				}else{
//					if(loadpage==1){
//						alert('暂无数据');
//					}else{
//						alert('所有数据都已在这');
//					}
				}
			});
		}
}